package data.platform.timescale.persistence.mapping;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.relational.core.mapping.Column;
import org.springframework.data.relational.core.mapping.Table;

import java.util.Date;
import java.util.Map;

/**
 * CREATE TABLE rule_point
 * (
 *     rule_id      TEXT             NOT NULL,
 *     event_time   TIMESTAMP        NOT NULL,
 *     hit_number   INTEGER          NOT NULL,
 *     hit_data     TEXT             NOT NULL
 * );
 *
 * SELECT create_hypertable('rule_point', 'event_time');
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Table(value = "rule_point")
public class RulePointEO {

    @Column("rule_id")
    private String ruleId;

    @Column("event_time")
    private Date eventTime;

    @Column("hit_number")
    private int hitNumber;

    @Column("hit_data")
    private String hitData;
}
